<template>
    <div>
        <iframe src="/horizon" frameborder="0" width="100%" height="100%" id="bdIframe"></iframe>
    </div>
</template>

<script>
    export default {
        name: "horizon",
        mounted() {
            const oIframe = document.getElementById('bdIframe');
            const deviceWidth = document.getElementsByClassName('el-main')[0].offsetWidth;
            const deviceHeight = document.getElementsByClassName('el-main')[0].clientHeight;
            //console.log(document.documentElement.clientWidth)
            oIframe.style.width = (Number(deviceWidth) - 57) + 'px'; //数字是页面布局宽度差值
            oIframe.style.height = (Number(deviceHeight) - 45) + 'px'; //数字是页面布局高度差
        }
    }
</script>

<style scoped>

</style>
